<div xmlns="http://www.w3.org/1999/xhtml" lang="en"
	 xmlns:f="http://typo3.org/ns/fluid/ViewHelpers"
	 xmlns:mf="http://typo3.org/ns/MiniFranske/FsMediaGallery/ViewHelpers">

	<!--
	 Displays a flattened, one-dimensional album list
	-->

	<f:section name="AlbumsList">
		<div class="albums-list">
			<mf:widget.paginate objects="{mediaAlbums}" as="paginatedAlbums" widgetId="album" configuration="{itemsPerPage:settings.list.pagination.itemsPerPage, insertAbove:settings.list.pagination.insertAbove, insertBelow:settings.list.pagination.insertBelow, maximumNumberOfLinks:settings.list.pagination.maximumNumberOfLinks, pagesBefore:settings.list.pagination.pagesBefore, pagesAfter:settings.list.pagination.pagesAfter}">
				<f:if condition="{paginatedAlbums}">
					<f:then>
						<div class="thumbs thumbs-albums clearfix">
							<f:for each="{paginatedAlbums}" as="pagedMediaAlbum">
								<f:render section="AlbumPreview" arguments="{mediaAlbum:pagedMediaAlbum}" />
							</f:for>
						</div>
					</f:then>
					<f:else>
						<div class="alert alert-info">
							<p><f:translate key="no_albums_found">No albums found.</f:translate></p>
						</div>
					</f:else>
				</f:if>
			</mf:widget.paginate>
		</div>
	</f:section>

	<f:section name="AlbumPreview">
		<f:if condition="{0:0, 1:1} == {0:mediaAlbum.assetsCount, 1:settings.list.hideEmptyAlbums}">
			<f:else>
				<div class="img-thumbnail">
					<f:render partial="MediaAlbum/Thumb" section="Thumb" arguments="{mediaAlbum:mediaAlbum, random:settings.list.thumb.random, width:settings.list.thumb.width, height:settings.list.thumb.height, resizeMode:settings.list.thumb.resizeMode}" />
				</div>
			</f:else>
		</f:if>
	</f:section>

</div>